package com.yf.model.ai.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yf.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * AI 会话表-AiConversation
 *
 * @author: YiFei
 * @since : 2025年7月6日 21:34:16
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(description = "AI 会话表")
@TableName("ai_conversation")
public class AiConversation extends BaseEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 751808856922L;
    /**
     * 主键
     */
    @Schema(description = "主键")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 用户Id
     */
    @Schema(description = "用户Id")
    private Long userId;

    /**
     * 会话标题
     */
    @Schema(description = "会话标题")
    private String title;

    /**
     * 面具
     */
    @Schema(description = "面具")
    private Integer currentMaskId;

    /**
     * 最后活动时间
     */
    @Schema(description = "最后活动时间")
    private LocalDateTime lastActiveTime;

    /**
     * 逻辑删除标识(0:未删除;1:已删除)
     */
    @Schema(description = "逻辑删除标识(0:未删除;1:已删除)")
    private Integer deleted;

    /**
     * 创建人Id
     */
    @Schema(description = "创建人Id")
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    /**
     * 修改人Id
     */
    @Schema(description = "修改人Id")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;

}
